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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: C = None
        self.p: D = None
        self.y: B = None
        self.w: B = None
        self.t: C = None
        self.txt = txt

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

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

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

g = A("g")
d = B("d")
k = C("k")
j = D("j")
n = E("n")
b = F("b")
l = B("l")
c = C("c")

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: C = None
        self.p: D = None
        self.y: B = None
        self.w: B = None
        self.t: C = None
        self.txt = txt

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

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

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

g = A("g")
d = B("d")
k = C("k")
j = D("j")
n = E("n")
b = F("b")
l = B("l")
c = C("c")

g.w = n
g.p = n
g.t = k
d.r = k
k.x = n
k.v = c
k.t = c
k.p = j
k.y = d
k.w = d
j.q = c
j.y = c
j.u = c
j.s = l
j.z = n
j.r = n
n.q = j
n.y = l
b.v = c
b.t = j
b.s = n
l.r = k
c.x = n
c.v = k
c.t = k
c.p = j
c.y = l
c.w = l
assert c.v.y.r.x.q.q.txt == "c"