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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: F = None
        self.v: E = None
        self.o: B = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

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

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

j = A("j")
f = B("f")
i = C("i")
n = D("n")
b = E("b")
l = F("l")
e = C("e")
g = C("g")

j.t = b
j.s = b
j.w = b
f.u = b
f.v = g
f.r = n
f.y = n
i.t = b
i.o = b
i.w = g
i.v = j
i.y = j
i.x = n
n.w = f
n.o = f
n.u = l
n.s = l
n.v = b
n.t = j
b.y = n
b.w = j
l.u = b
l.s = j
e.t = b
e.o = b
e.w = i
e.v = j
e.y = j
e.x = n
g.t = b
g.o = b
g.w = e
g.v = j
g.y = j
g.x = n
assert g.w.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: E = None
        self.w: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: F = None
        self.v: E = None
        self.o: B = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

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

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

j = A("j")
f = B("f")
i = C("i")
n = D("n")
b = E("b")
l = F("l")
e = C("e")
g = C("g")

j.t = b
j.s = b
j.w = b
f.u = b
f.v = g
f.r = n
f.y = n
i.t = b
i.o = b
i.w = g
i.v = j
i.y = j
i.x = n
n.w = f
n.o = f
n.u = l
n.s = l
n.v = b
n.t = j
b.y = n
b.w = j
l.u = b
l.s = j
e.t = b
e.o = b
e.w = i
e.v = j
e.y = j
e.x = n
g.t = b
g.o = b
g.w = e
g.v = j
g.y = j
g.x = n
assert g.w.t.y.txt == "n"