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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: E = None
        self.z: D = None
        self.p: F = None
        self.txt = txt

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

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

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

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

e = A("e")
l = B("l")
h = C("h")
d = D("d")
b = E("b")
i = F("i")
m = C("m")
c = B("c")

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: E = None
        self.z: D = None
        self.p: F = None
        self.txt = txt

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

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

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

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

e = A("e")
l = B("l")
h = C("h")
d = D("d")
b = E("b")
i = F("i")
m = C("m")
c = B("c")

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