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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

f = A("f")
c = B("c")
k = C("k")
i = D("i")
l = E("l")
j = F("j")
g = G("g")

f.u = l
f.w = l
f.z = l
f.o = i
f.t = k
f.x = c
f.p = j
c.o = k
k.u = f
k.t = l
i.u = j
l.y = k
l.s = f
l.v = g
j.r = c
g.t = j
g.q = i
g.v = l
assert g.v.y.u.x.o.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: D = None
        self.w: E = None
        self.t: C = None
        self.x: B = None
        self.p: F = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

f = A("f")
c = B("c")
k = C("k")
i = D("i")
l = E("l")
j = F("j")
g = G("g")

f.u = l
f.w = l
f.z = l
f.o = i
f.t = k
f.x = c
f.p = j
c.o = k
k.u = f
k.t = l
i.u = j
l.y = k
l.s = f
l.v = g
j.r = c
g.t = j
g.q = i
g.v = l
assert g.v.y.u.x.o.u.z.txt == "l"