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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: C = None
        self.p: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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