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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.t: C = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.v: C = None
        self.y: D = None
        self.u: C = None
        self.txt = txt

b = A("b")
i = B("i")
k = C("k")
f = D("f")
j = E("j")
a = F("a")
g = C("g")
n = B("n")
d = D("d")

b.u = g
b.o = k
b.q = k
b.r = j
b.y = d
b.p = a
i.q = f
i.x = f
i.t = g
i.u = b
k.q = i
k.x = i
k.t = i
k.o = n
k.s = j
f.q = n
f.s = a
j.u = f
j.r = b
a.w = k
a.u = k
a.t = f
a.v = g
a.y = d
g.q = n
g.x = n
g.o = n
g.t = i
g.s = j
n.q = d
n.x = d
n.t = g
n.u = b
d.q = n
d.s = a
assert b.p.t.s.t.q.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: C = None
        self.r: E = None
        self.q: C = None
        self.y: D = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.t: C = None
        self.u: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.v: C = None
        self.y: D = None
        self.u: C = None
        self.txt = txt

b = A("b")
i = B("i")
k = C("k")
f = D("f")
j = E("j")
a = F("a")
g = C("g")
n = B("n")
d = D("d")

b.u = g
b.o = k
b.q = k
b.r = j
b.y = d
b.p = a
i.q = f
i.x = f
i.t = g
i.u = b
k.q = i
k.x = i
k.t = i
k.o = n
k.s = j
f.q = n
f.s = a
j.u = f
j.r = b
a.w = k
a.u = k
a.t = f
a.v = g
a.y = d
g.q = n
g.x = n
g.o = n
g.t = i
g.s = j
n.q = d
n.x = d
n.t = g
n.u = b
d.q = n
d.s = a
assert b.p.t.s.t.q.t.s.txt == "j"