class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: F = None
        self.r: D = None
        self.t: F = None
        self.v: F = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: F = None
        self.v: G = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: G = None
        self.q: I = None
        self.o: E = None
        self.z: A = None
        self.v: F = None
        self.u: G = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: D = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: G = None
        self.y: B = None
        self.t: F = None
        self.z: E = None
        self.u: G = None
        self.r: I = None
        self.x: B = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: E = None
        self.txt = txt

i = A("i")
e = B("e")
b = C("b")
j = D("j")
m = E("m")
n = F("n")
h = G("h")
k = H("k")
f = I("f")

i.q = e
i.z = n
i.t = n
i.v = n
i.y = n
i.r = j
e.w = h
e.v = h
e.p = n
e.o = m
b.p = f
b.q = f
b.y = h
b.u = h
b.o = m
b.z = i
b.v = n
b.w = n
j.w = b
m.p = f
m.y = j
m.u = b
n.u = i
n.v = k
h.t = i
k.p = j
k.s = h
k.u = h
k.y = e
k.x = e
k.t = n
k.z = m
k.r = f
k.v = i
f.t = h
f.r = m
assert i.r.w.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: F = None
        self.r: D = None
        self.t: F = None
        self.v: F = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: F = None
        self.v: G = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: G = None
        self.q: I = None
        self.o: E = None
        self.z: A = None
        self.v: F = None
        self.u: G = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: D = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: G = None
        self.y: B = None
        self.t: F = None
        self.z: E = None
        self.u: G = None
        self.r: I = None
        self.x: B = None
        self.v: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: E = None
        self.txt = txt

i = A("i")
e = B("e")
b = C("b")
j = D("j")
m = E("m")
n = F("n")
h = G("h")
k = H("k")
f = I("f")

i.q = e
i.z = n
i.t = n
i.v = n
i.y = n
i.r = j
e.w = h
e.v = h
e.p = n
e.o = m
b.p = f
b.q = f
b.y = h
b.u = h
b.o = m
b.z = i
b.v = n
b.w = n
j.w = b
m.p = f
m.y = j
m.u = b
n.u = i
n.v = k
h.t = i
k.p = j
k.s = h
k.u = h
k.y = e
k.x = e
k.t = n
k.z = m
k.r = f
k.v = i
f.t = h
f.r = m
assert i.r.w.p.t.txt == "h"