class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: F = None
        self.t: F = None
        self.z: B = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: A = None
        self.t: D = 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.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.v: F = None
        self.q: E = None
        self.w: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: A = None
        self.t: D = 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.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.v: F = None
        self.q: E = None
        self.w: E = None
        self.txt = txt

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

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

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