class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: F = None
        self.u: B = None
        self.s: I = None
        self.r: C = None
        self.z: B = None
        self.w: F = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: A = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: A = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: I = None
        self.w: E = None
        self.s: D = None
        self.z: E = None
        self.y: E = None
        self.q: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: A = None
        self.x: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: A = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: I = None
        self.w: E = None
        self.s: D = None
        self.z: E = None
        self.y: E = None
        self.q: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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