class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: E = None
        self.z: H = None
        self.r: E = None
        self.o: E = None
        self.x: I = None
        self.q: H = None
        self.y: B = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.z: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: F = None
        self.u: I = None
        self.x: C = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: H = None
        self.p: C = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.q: H = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.v: I = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.z: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: F = None
        self.u: I = None
        self.x: C = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: H = None
        self.p: C = None
        self.q: C = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.q: H = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: C = None
        self.v: I = None
        self.o: E = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: D = None
        self.txt = txt

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

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

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