class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: B = None
        self.s: B = None
        self.v: A = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.v: A = None
        self.r: C = None
        self.u: B = None
        self.txt = txt

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

l = A("l")
a = B("a")
k = C("k")
g = D("g")
d = E("d")
m = F("m")
j = A("j")
b = B("b")
c = E("c")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.v: A = None
        self.r: C = None
        self.u: B = None
        self.txt = txt

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

l = A("l")
a = B("a")
k = C("k")
g = D("g")
d = E("d")
m = F("m")
j = A("j")
b = B("b")
c = E("c")

l.w = m
l.z = m
l.t = b
l.s = a
l.r = a
l.v = j
a.z = d
a.x = k
a.q = g
k.o = d
k.w = g
g.u = j
d.p = c
d.x = c
d.v = l
d.r = k
d.u = a
m.z = j
m.t = d
j.w = m
j.z = m
j.t = a
j.s = b
j.r = b
j.v = l
b.z = c
b.x = k
b.q = g
c.p = d
c.x = d
c.v = j
c.r = k
c.u = a
assert d.r.o.p.r.w.txt == "g"