class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: B = None
        self.w: D = None
        self.o: E = None
        self.p: A = None
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.q: B = None
        self.txt = txt

e = A("e")
b = B("b")
i = C("i")
h = D("h")
f = E("f")
n = F("n")
m = E("m")
g = F("g")
l = A("l")

e.r = h
e.s = h
e.t = n
b.t = m
b.q = l
b.r = g
b.v = i
i.y = e
i.s = b
i.z = b
i.w = h
i.o = m
i.p = l
h.t = l
f.w = l
f.r = l
f.y = g
n.r = h
n.y = l
n.q = b
m.w = e
m.r = e
m.y = n
g.r = h
g.y = l
g.q = b
l.r = h
l.s = h
l.t = n
assert e.t.y.t.r.t.s.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: B = None
        self.w: D = None
        self.o: E = None
        self.p: A = None
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: A = None
        self.q: B = None
        self.txt = txt

e = A("e")
b = B("b")
i = C("i")
h = D("h")
f = E("f")
n = F("n")
m = E("m")
g = F("g")
l = A("l")

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