class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: B = None
        self.txt = txt

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

l = A("l")
g = B("g")
f = C("f")
h = D("h")
e = E("e")
j = F("j")
d = D("d")
c = F("c")

l.t = e
l.p = e
l.x = f
g.w = e
g.z = f
g.t = f
g.v = h
f.s = l
h.r = f
h.x = j
h.s = l
e.s = l
e.t = g
j.q = c
d.r = f
d.x = c
d.s = l
c.q = j
assert l.t.t.v.r.s.t.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: C = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: B = None
        self.txt = txt

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

l = A("l")
g = B("g")
f = C("f")
h = D("h")
e = E("e")
j = F("j")
d = D("d")
c = F("c")

l.t = e
l.p = e
l.x = f
g.w = e
g.z = f
g.t = f
g.v = h
f.s = l
h.r = f
h.x = j
h.s = l
e.s = l
e.t = g
j.q = c
d.r = f
d.x = c
d.s = l
c.q = j
assert l.t.t.v.r.s.t.s.p.txt == "e"