class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: G = None
        self.t: E = None
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: D = None
        self.txt = txt

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

f = A("f")
k = B("k")
c = C("c")
j = D("j")
e = E("e")
b = F("b")
m = G("m")
h = B("h")
a = F("a")

f.u = c
f.o = m
f.t = e
f.r = e
k.w = j
k.u = m
c.p = j
j.u = c
j.z = m
j.v = b
e.t = h
e.v = j
b.v = m
b.r = j
m.v = f
m.u = f
m.w = e
m.y = e
m.s = a
h.w = j
h.u = m
a.v = m
a.r = j
assert c.p.z.s.v.v.u.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: G = None
        self.t: E = None
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: G = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: D = None
        self.txt = txt

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

f = A("f")
k = B("k")
c = C("c")
j = D("j")
e = E("e")
b = F("b")
m = G("m")
h = B("h")
a = F("a")

f.u = c
f.o = m
f.t = e
f.r = e
k.w = j
k.u = m
c.p = j
j.u = c
j.z = m
j.v = b
e.t = h
e.v = j
b.v = m
b.r = j
m.v = f
m.u = f
m.w = e
m.y = e
m.s = a
h.w = j
h.u = m
a.v = m
a.r = j
assert c.p.z.s.v.v.u.p.u.txt == "c"