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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: F = None
        self.y: D = None
        self.r: D = None
        self.t: B = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: C = None
        self.z: A = None
        self.p: C = None
        self.v: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: F = None
        self.y: D = None
        self.r: D = None
        self.t: B = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: C = None
        self.z: A = None
        self.p: C = None
        self.v: F = None
        self.txt = txt

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

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