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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: E = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

b = A("b")
k = B("k")
j = C("j")
i = D("i")
a = E("a")
c = F("c")
l = B("l")

b.w = i
b.y = i
b.q = a
b.t = l
b.p = j
b.v = j
k.p = j
k.t = i
j.o = i
j.s = i
j.t = c
j.y = c
j.r = b
i.r = a
i.v = a
i.p = j
a.y = j
c.t = a
c.r = a
c.q = j
l.p = j
l.t = i
assert c.q.r.q.y.r.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: D = None
        self.q: E = None
        self.t: B = None
        self.p: C = None
        self.v: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: E = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

b = A("b")
k = B("k")
j = C("j")
i = D("i")
a = E("a")
c = F("c")
l = B("l")

b.w = i
b.y = i
b.q = a
b.t = l
b.p = j
b.v = j
k.p = j
k.t = i
j.o = i
j.s = i
j.t = c
j.y = c
j.r = b
i.r = a
i.v = a
i.p = j
a.y = j
c.t = a
c.r = a
c.q = j
l.p = j
l.t = i
assert c.q.r.q.y.r.t.p.txt == "j"