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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: A = None
        self.p: F = None
        self.w: A = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.t: C = None
        self.v: D = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: A = None
        self.p: F = None
        self.w: A = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: B = None
        self.t: C = None
        self.v: D = None
        self.q: B = None
        self.txt = txt

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

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

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