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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.s: F = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: B = None
        self.q: F = None
        self.o: B = None
        self.t: B = None
        self.w: B = None
        self.txt = txt

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

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

b.r = h
b.o = m
b.x = j
h.o = b
h.t = j
h.y = j
h.w = j
h.x = e
h.s = i
j.z = h
j.t = h
j.s = n
j.o = n
m.o = h
i.v = e
i.y = h
i.o = h
i.t = h
i.w = h
i.q = n
n.x = j
n.r = m
n.q = m
e.v = i
e.y = h
e.o = h
e.t = h
e.w = h
e.q = n
assert e.v.v.o.o.x.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: D = None
        self.x: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.s: F = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: B = None
        self.q: F = None
        self.o: B = None
        self.t: B = None
        self.w: B = None
        self.txt = txt

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

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

b.r = h
b.o = m
b.x = j
h.o = b
h.t = j
h.y = j
h.w = j
h.x = e
h.s = i
j.z = h
j.t = h
j.s = n
j.o = n
m.o = h
i.v = e
i.y = h
i.o = h
i.t = h
i.w = h
i.q = n
n.x = j
n.r = m
n.q = m
e.v = i
e.y = h
e.o = h
e.t = h
e.w = h
e.q = n
assert e.v.v.o.o.x.z.x.txt == "e"