class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: G = None
        self.q: D = None
        self.r: F = None
        self.o: D = None
        self.u: F = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.y: E = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: H = None
        self.v: G = None
        self.u: F = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: F = None
        self.p: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: G = None
        self.o: E = None
        self.s: H = None
        self.y: E = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: A = None
        self.z: G = None
        self.v: B = None
        self.s: A = None
        self.x: D = None
        self.q: E = None
        self.u: E = None
        self.txt = txt

b = A("b")
j = B("j")
c = C("c")
m = D("m")
i = E("i")
e = F("e")
d = G("d")
f = H("f")
n = H("n")

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: A = None
        self.y: E = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: H = None
        self.v: G = None
        self.u: F = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: F = None
        self.p: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: G = None
        self.o: E = None
        self.s: H = None
        self.y: E = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: A = None
        self.z: G = None
        self.v: B = None
        self.s: A = None
        self.x: D = None
        self.q: E = None
        self.u: E = None
        self.txt = txt

b = A("b")
j = B("j")
c = C("c")
m = D("m")
i = E("i")
e = F("e")
d = G("d")
f = H("f")
n = H("n")

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