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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.u: C = None
        self.w: B = None
        self.r: E = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: A = None
        self.o: A = None
        self.z: C = None
        self.r: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.u: C = None
        self.w: B = None
        self.r: E = None
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: A = None
        self.o: A = None
        self.z: C = None
        self.r: A = None
        self.txt = txt

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

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