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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

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

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

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