class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.r: D = None
        self.v: E = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: D = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: D = None
        self.o: A = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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