class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: B = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: H = None
        self.r: G = None
        self.y: E = None
        self.q: H = None
        self.v: E = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.w: B = None
        self.t: C = None
        self.v: D = None
        self.y: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: H = None
        self.r: G = None
        self.y: E = None
        self.q: H = None
        self.v: E = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.w: B = None
        self.t: C = None
        self.v: D = None
        self.y: H = None
        self.txt = txt

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

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