class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: B = None
        self.q: E = None
        self.w: C = None
        self.p: F = None
        self.u: H = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: A = None
        self.y: F = None
        self.u: D = None
        self.s: B = None
        self.p: E = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.r: A = None
        self.s: B = None
        self.u: B = None
        self.v: F = None
        self.o: B = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: E = None
        self.t: D = None
        self.y: D = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: A = None
        self.y: F = None
        self.u: D = None
        self.s: B = None
        self.p: E = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.r: A = None
        self.s: B = None
        self.u: B = None
        self.v: F = None
        self.o: B = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: E = None
        self.t: D = None
        self.y: D = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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