class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: F = None
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: F = None
        self.z: C = None
        self.u: F = None
        self.t: D = None
        self.txt = txt

g = A("g")
n = B("n")
m = C("m")
j = D("j")
k = E("k")
b = F("b")
c = B("c")
e = C("e")
h = F("h")
l = A("l")

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: F = None
        self.x: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: F = None
        self.z: C = None
        self.u: F = None
        self.t: D = None
        self.txt = txt

g = A("g")
n = B("n")
m = C("m")
j = D("j")
k = E("k")
b = F("b")
c = B("c")
e = C("e")
h = F("h")
l = A("l")

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