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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.w: D = None
        self.o: C = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.o: B = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: B = None
        self.q: E = None
        self.txt = txt

g = A("g")
f = B("f")
e = C("e")
n = D("n")
j = E("j")
a = F("a")
m = E("m")
d = F("d")
l = F("l")
c = E("c")

g.r = n
g.u = m
g.w = d
g.p = d
f.p = g
f.s = d
f.w = n
f.o = e
f.r = j
e.q = f
e.o = f
e.x = n
e.r = a
n.r = g
j.v = f
j.t = f
a.z = j
a.w = f
a.q = c
m.v = f
m.t = f
d.z = m
d.w = f
d.q = j
l.z = m
l.w = f
l.q = c
c.v = f
c.t = f
assert f.s.z.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: E = None
        self.w: F = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.s: F = None
        self.w: D = None
        self.o: C = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.o: B = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: B = None
        self.q: E = None
        self.txt = txt

g = A("g")
f = B("f")
e = C("e")
n = D("n")
j = E("j")
a = F("a")
m = E("m")
d = F("d")
l = F("l")
c = E("c")

g.r = n
g.u = m
g.w = d
g.p = d
f.p = g
f.s = d
f.w = n
f.o = e
f.r = j
e.q = f
e.o = f
e.x = n
e.r = a
n.r = g
j.v = f
j.t = f
a.z = j
a.w = f
a.q = c
m.v = f
m.t = f
d.z = m
d.w = f
d.q = j
l.z = m
l.w = f
l.q = c
c.v = f
c.t = f
assert f.s.z.t.w.txt == "n"